package controller

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

// RegisterRoutes 标准Rest url 是可读的, 可以直接分辨出对资源的操作
func RegisterRoutes(r gin.IRouter) {

	r.GET("/book", func(c *gin.Context) {
		c.String(200, http.MethodGet)
	})

	r.POST("/book", func(c *gin.Context) {
		c.String(200, http.MethodPost)
	})

	r.PUT("/book", func(c *gin.Context) {
		c.String(200, http.MethodPut)
	})

	r.DELETE("/book", func(c *gin.Context) {
		c.String(200, http.MethodDelete)
	})
}
